﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
 
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
<c:set var="webpath" value="${pageContext.request.contextPath}" />
<head>
    <title></title>
    
    <script>
        var ui = "";
        var $EnableConfigGridHead =false;
    </script>
    <link href="/Workflow/Resources/Css/base.css" rel="stylesheet" />
    <!--外部JS-->
    <script src="/Workflow/Resources/JScript/jquery.min.js"></script>
    <link rel="stylesheet" href="/Workflow/Resources/Bootstrap/css/bootstrap.min.css" />
    <!--bootstrap样式主题-->
    <link id="bootstrapTheme" rel="stylesheet" href="/Workflow/Resources/Bootstrap/css/bootstrap-blue-theme.css" />
    <script src="/Workflow/Resources/Bootstrap/js/bootstrap.min.js"></script>
    <!--easyuis样式主题-->
    <link id="easyuiThemelink" href="/Workflow/Resources/EasyUI/themes/bootstrap/easyui.css" rel="stylesheet" />
    <link href="/Workflow/Resources/EasyUI/themes/icon.css" rel="stylesheet" />
    <script src="/Workflow/Resources/EasyUI/jquery.easyui.min.js"></script>
    <script src="/Workflow/Resources/JScript/Validate/validateRules.js"></script>
    <script src="/Workflow/Resources/JScript/Validate/easyui-validateboxExtend.js"></script>
    <script src="/Workflow/Resources/EasyUI/locale/easyui-lang-zh_CN.js"></script>
    <link href="/Workflow/Resources/Qtip/jquery.qtip.css" rel="stylesheet" />
    <script src="/Workflow/Resources/Qtip/jquery.qtip.js"></script>

    <!--外部-->

    <link href="/Workflow/Resources/Jscript/Plugins/css/FUI.DataGrid.css" rel="stylesheet" />
    <script src="/Workflow/Resources/Jscript/jquery.operate.js"></script>

    <script src="/Workflow/Resources/JScript/Base/baseContext.js"></script>
    <script src="/Workflow/Resources/JScript/JSCommon.js"></script>


    <script src="/Workflow/Resources/JScript/Plugin/fui.package.js"></script>
    <script src="/Workflow/Resources/Jscript/Plugin/fui.dialog.js"></script>
    <script src="/Workflow/Resources/Jscript/SelectorDialog/customDialog.js"></script>
    <script src="/Workflow/Resources/Jscript/SelectorDialog/selectorDailog.js"></script>

    <script src="/Workflow/Resources/JScript/FUI.DataGrid.js"></script>
    <script src="/Workflow/Resources/JScript/Form.js"></script>
    <script src="/Workflow/Resources/JScript/FUI.SmartForm.js"></script>

    <script src="/Workflow/Resources/JScript/Workflow.js"></script>


    <!--自定义样式主题-->
    <link id="workflowThemelink" href="/Workflow/Resources/Css/blue.css?v=1" rel="stylesheet" />
    <link href="/Workflow/Resources/Css/custom.css" rel="stylesheet" />
    <link href="/Workflow/Resources/Css/bootstrapEasyui.css" rel="stylesheet" />
    <link href="/Workflow/Resources/Css/icons.css" rel="stylesheet" />
    <link href="/Workflow/Resources/Css/appIcons.css" rel="stylesheet" />
    <link rel="stylesheet" href="/Workflow/Resources/Awesome/css/font-awesome.min.css" />
    <script type="text/javascript" src="../../dialogs/internal.js"></script>
    <!--[if IE 7]>
    <link rel="stylesheet" href="/Workflow/Resources/Awesome/css/font-awesome-ie7.css">
    <![endif]-->

</head>
<body class="easyui-layout" style="overflow: hidden;">
    <div region="center" style="padding: 5px;" border="false">
        <table id="grid"></table>
    </div>
</body>
</html>

<script type="text/javascript">
    var oNode = null
    var $text = null;
    var thePlugins = 'form_officialTemplate';
    $(function () {
        
    });
    dialog.oncancel = function () {
         
    };
    dialog.onok = function () {
        var id=dg.getSelected();
        if(id==""){
            FUI.Window.showMsg("请选择套红模板");
            return false;
        }
        try{
            var result = Object.toAjaxJson("/OfficialTemplate/", "GetOfficialTemplateJson", { KeyId: id });
            editor.setContent(result.TemplateContent);
        }
        catch(err){
            FUI.Window.showMsg("获取套红模板出错"+err);
            return false;
        }

    }

</script>
<script type="text/javascript" language="javascript">
    var dg;
    dg = FUI.DataGrid.Create('office_OfficialTemplate', 'office_OfficialTemplate', 'grid', false, true, true);
    dg.SortName = "TemplateUpdateTime";
    dg.SortOrder = "desc";
    dg.ToolBarDefaultButtons.ShowDelete = false;
    dg.ToolBarDefaultButtons.ShowSearch = false;
    dg.ToolBarDefaultButtons.ShowAdd = false;
    dg.IsSimpleSearch = true;
    dg.SingleSelect=true;
    //是否开启双击编辑
    dg.EnableDblClickEdite = false;
    dg.DefaultWhere = "IsEnable=1 and TemplateType='official'";
    dg.OperationAction.ShowView = true;
    dg.OperationAction.ShowEdit = false;
    dg.OperationAction.ShowDelete = false;
    dg.EditTitle = "套红模板";
    dg.EditWidth = 700;
    dg.EditHeight = 400;
    dg.HidColumns = ["TemplateId", "IsEnable", "OrderNum", "LastUpdateRealName", "TemplateCode", "Remark"];
    dg.Bind();
 
</script>
